import request from "@/utils/request.js";

// 设备概览接口
export const $deviceCount = () => {
  return request.get("/device/count");
};

// 传感器 接口
export const $sensorCount = () => {
  return request.get("/sensor/count");
};

// 设备数据 接口
export const $sensorList = () => {
  return request.get("device/sensorList");
};

// 设备网关 接口
export const $gatewayList = (params) => {
  return request.get("gateway/list", { params });
};

// 传感器 接口
export const $cgqList = (params) => {
  return request.get("sensor/list", { params });
};

// 设备节点群组 接口
export const $devGroup = (params) => {
  return request.get("group/list", { params });
};

// 添加用户列表 接口
export const $addCount = (data) => {
  return request.post("/account/add", data);
};

// 用户列表 接口
export const $userList = (params) => {
  return request.get("/account/list", { params });
};

// 添加
export const $groupAdd = (data) => {
  return request.post("/group/add", data);
};

// 修改
export const $groupEdit = (data) => {
  return request.post("/group/edit", data);
};

// 删除
export const $groupDel = (data) => {
  return request.post("/group/del", data);
};

// 登录api
export const $accountLogin = (data) => {
  return request.post("/account/login", data);
};

// 秘钥列表api
export const $securityList = () => {
  return request.get("/security/list");
};

// 测量类型列表api
export const $measurementList = () => {
  return request.get("/measurement/list");
};

// 充值记录api
export const $feeRecord = (params) => {
  return request.get("/fee/rechargeList", { params });
};

// 使用记录api
export const $usageList = (params) => {
  return request.get("/fee/usageList", { params });
};
